﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Foothill.Model;

namespace Foothill.DataAccess.Interface
{
    public interface IUserAccountRepo
    {
        int GetUserIdByEmailAddress(string email);

        int CreateNewUserAccount(UserAccountDto newAcctInfo);

        int GetUserIdByEmailAndPassword(string email, string hashedPassword);

        UserAccountDto GetUserAccountByActivationCode(Guid authCode);

        void ActivateUserAccount(UserAccountDto userAcct);

        int GetUserIdByUsername(string userName);

        UserAccountDto GetUserAccountByEmailAndPassword(string email, string hashedPassword);

        UserAccountDto GetUserAccountDetailsByUserName(string username);

        UserAccountDto GetUserAccountDetailsByUserId(int userId);

        UserAccountDto GetUserAccountByEmail(string email);

        void SavePost(int userId, int postId);

        void UpdateUserAccountWithTempPassword(int userId, string tmpPassword, int accountStateId);

        void ChangePassword(int userId, string hashedNewPassword);

        // used when user requested password recovery, but logged in using the correct (non-temp) password
        void RestorePasswordRecoveryState(int userId, int activeUserStateId);

        void ChangePasswordAfterLoginUsingTempPassword(int userId, int activeUserStateId, string hashedNewPassword);

        void UpdateUserAccount(int userId, UserAccountDto dto);

        void UpdateLogoFilePath(int userId, string logoFilePath);

        void UpdateProfilePhotoFilePath(int userId, string filePath);

        void DeleteUserAccount(int userId);

        void UpdatePendingAccountAfterSendingActivation(UserAccountDto dto);
    }
}
